package xyz.scootaloo.adt.tree;

/**
 * @author flutterdash@qq.com
 * @since 2021/3/11 10:27
 */
public class BNode<T extends Comparable<T>> {

    private T key;
    private BNode<T> leftChild;
    private BNode<T> rightChild;

    public BNode(T key) {
        this.key = key;
    }

    public T getKey() {
        return key;
    }

    public void setKey(T key) {
        this.key = key;
    }

    public BNode<T> getLeftChild() {
        return leftChild;
    }

    public void setLeftChild(BNode<T> leftChild) {
        this.leftChild = leftChild;
    }

    public BNode<T> getRightChild() {
        return rightChild;
    }

    public void setRightChild(BNode<T> rightChild) {
        this.rightChild = rightChild;
    }

}
